package com.literature.search.core.entity;

import com.literature.search.core.enums.ThumbSizeEnum;
import com.literature.search.core.enums.ThumbnailEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

/**
 * @ClassName Thumbnail
 * @Description 缩略图相关的类
 * @Author abin
 * @Date 2023/2/22 23:41
 * @Version 1.0
 */
@Data
@Document(collection = "thumbnail")
public class Thumbnail implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 缩略图id
     */
    @Id
    @ApiModelProperty(value = "缩略图id")
    private Long id;

    /**
     * 对象的id
     */
    @ApiModelProperty(value = "对象的id")
    @Field("object_id")
    private Long objectId;

    /**
     * 不同种类型
     */
    @ApiModelProperty(value = "缩略图类型")
    @Field("thumbnail_enum")
    private ThumbnailEnum thumbnailEnum;

    /**
     * 大文件管理GridFS的ID
     */
    @ApiModelProperty(value = "大文件管理GridFS的ID")
    @Field("gridfs_id")
    private String gridfsId;

    /**
     * 缩略图的尺寸大小
     **/
    @ApiModelProperty(value = "缩略图的尺寸大小")
    @Field("thumb_size_enum")
    private ThumbSizeEnum thumbSizeEnum;
}
